﻿#ifndef _BASE_DEF_H_
#define _BASE_DEF_H_	

// 数据类型
#ifndef WIN32
typedef unsigned int        DWORD;
typedef int                 BOOL;
typedef unsigned char       BYTE;
//typedef unsigned short      WORD;
//typedef wchar_t				WCHAR;
typedef unsigned int        UINT;
#endif

typedef unsigned short      WORD;
typedef wchar_t				WCHAR;
typedef signed char         INT8;
typedef signed short        INT16;
typedef signed int          INT32;
typedef unsigned char       UINT8;
typedef unsigned short      UINT16;
typedef unsigned int        UINT32;


/* 64λ����: �������� */
#ifdef WIN32
typedef __int64             INT64;
typedef unsigned __int64    UINT64;
// TRACE_LOG��scanf�ĸ�ʽ���
#define PRIi64 "I64d"
#define PRIu64 "I64d"
#else
typedef long long            INT64;
typedef unsigned long long   UINT64;
#define PRIi64 "lld"
#define PRIu64 "llu"
#endif

/**** usage *****
TRACE_LOG("%"PRIu64".\n", x );
*****************/




#define FALSE   0
#define TRUE    1

#define MIN(a,b)  (((a) < (b)) ? (a) : (b))
#define MAX(a,b)  (((a) > (b)) ? (a) : (b))

#define SAFEDELETE(p) if(p!=NULL){ delete p; p=NULL; }

#define IS_BIT_SET(var, BIT) ((BIT) == ((BIT) & (var))) //var变量 BIT常量


typedef void *HANDLE;


#define		OS_MAX_PATH		260




#endif
